<%-- 
    Document   : index
    Created on : 24-mag-2011, 15.26.25
    Author     : Ale
--%>

<%@page import="utilities.Utilities"%>
<%@page import="entity.UtenteRegistrato"%>
<%@page import="statefulSB.UtenteLoggatoLocal"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>


<%! 
    String show; 
    String errore; 
    Boolean benvenuto;
    Boolean pwModificata;
    UtenteRegistrato utenteLoggato;
%>

<%
    show = (String) request.getAttribute("show");
    benvenuto = (Boolean) request.getAttribute("benvenuto");
    pwModificata = (Boolean) request.getAttribute("pwModificata");
    errore = (String) request.getAttribute("errore");
    utenteLoggato = Utilities.getUtenteLoggato(request);
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Shipping Share :: Benvenuto!</title>
        
        <link rel="stylesheet" href="css/common.css" type="text/css"/>
        <link rel="stylesheet" href="css/header.css" type="text/css"/>
        <link rel="stylesheet" href="css/form.css" type="text/css"/>
	<link rel="stylesheet" href="css/annuncio.css" type="text/css"/>
	<link rel="stylesheet" href="css/footer.css" type="text/css"/>
        <link rel="stylesheet" href="css/popup.css" type="text/css"/>
        <link rel="stylesheet" href="css/profilo.css" type="text/css"/>
        <link rel="stylesheet" href="css/regioni.css" type="text/css"/>
        <script src="js/popup.js"></script>
        <script src="js/liquidCheck.js"></script>
        <script src="js/ajax.js"></script>
        <script src="italia/italia.js"></script>
        <script src="js/checkForm.js"></script>
        
        <!-- star rating  -->
        <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
        <script src="star-rating/jquery.rating.pack.js"></script>
        <script src="star-rating/jquery.MetaData.pack.js"></script>
        <link rel="stylesheet" href="star-rating/jquery.rating.css" type="text/css"/>
    </head>
	
    <body onLoad="mostraAnnunciInScadenza()">
        
        <div id="popupContainer">
        <%  if(benvenuto!= null && benvenuto == true){ %>
            <jsp:include page="WEB-INF/jspf/benvenuto.jsp"/>
        <%  }
            else if (pwModificata != null){%>
                <jsp:include page="WEB-INF/jspf/pwModificata.jsp"/>
        <%  } %>
        
        </div>
        
        <div id="wholeContainer">
	<div id="whole">
            
            <!-- includo l'header -->
           
            <div id="headerContainer">
                <jsp:include page="WEB-INF/jspf/header.jsp" />
            </div>
            
            <div id="bodyContainer">
                
                <div>
                    
                                
                <%  if (utenteLoggato != null){ %>
                    <h1>I tuoi annunci</h1>
                    
                    <%  if(errore != null && !errore.equals("")){ %>
                        <div class='feedback'>
                            <h3>Attenzione...</h3>
                            Sono stati trovati i seguenti errori:
                            <ul>
                            <%= errore %>
                            </ul>
                        </div>
                    <%  } %>
                    
                <%
                        if (show != null && show.equals("iscritto")){ %>
                            <jsp:include page="WEB-INF/jspf/annunciIscritto.jsp" />
                <%      }           
                        else{ %>
                            <jsp:include page="WEB-INF/jspf/annunciCreati.jsp" />
                <%      }
                    } %>
                    
                </div>
                                
                <!-- includo il body (al suo interno cambia in base al tipo di utente) -->
                <jsp:include page="WEB-INF/jspf/annunciRegione.jsp" />
            
            </div> <!-- bodyContainer -->
			
            <!-- includo il footer -->
            <jsp:include page="WEB-INF/html/footer.html" />
            
            
        		
        </div> <!-- whole -->
        
        </div>
        
        
        
    </body>
	
</html>